#define _CRT_SECURE_NO_WARNINGS 1
class Solution {
public:
    double Pow(double x, int n)
    {
        if (n == 0) return 1.0;
        double tmp = Pow(x, n / 2);

        return n % 2 == 0 ? tmp * tmp : tmp * tmp * x;
    }
    double myPow(double x, int n) {
        return n > 0 ? Pow(x, n) : 1 / Pow(x, -(long long)n);
    }
};